package org.datascooter.test.jpaSimple;

import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = "DLVY_SVC")
public class DeliveryService {

	private String serviceName;
	private int priceCategory;
	private Collection customers;

	@Id
	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public int getPriceCategory() {
		return priceCategory;
	}

	public void setPriceCategory(int priceCategory) {
		this.priceCategory = priceCategory;
	}

	@ManyToMany(targetEntity = Customer.class)
	@JoinTable(name = "CUST_DLVRY")
	public Collection getCustomers() {
		return customers;
	}

	public void setCustomers(Collection customers) {
		this.customers = customers;
	}
}
